package com.xydtech.ecard.merchant.controller;


import com.xydtech.common.core.controller.BaseController;
import com.xydtech.common.core.page.TableDataInfo;
import com.xydtech.ecard.merchant.domain.EcardUser;
import com.xydtech.ecard.merchant.service.IEcardUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/*
 * 根据机构查询注册的客户经理，用于客户移交
 *@author lin
 *@version 1.0
 *@create 2023/8/2 9:37
 */
@Controller
@RequestMapping("/merchant/user")
public class EcardUserController extends BaseController {
    @Autowired
    private IEcardUserService ecardUserService;

    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(EcardUser ecardUser) {
        String salt = getSalt();//盐值
        startPage();
        List<EcardUser> list = ecardUserService.selectEcardUserList(ecardUser, salt);
        return getDataTable(list);
    }
}
